package vista;

import modelo.Horario;

import com.uqbar.commons.collections.Transformer;

public class HorarioToStringTransformer implements Transformer<Horario, String> {

	@Override
	public String transform(Horario element) {
		if(element.duracion().getStandardHours()!=0){
			StringBuilder result=new StringBuilder();
			result.append(element.getInicio().toString("HH:mm"))
			.append(" a ")
			.append(element.getFin().toString("HH:mm"));
			return result.toString();
		}else{
			return "-";
		}
	}

}
